<template>
  <el-dialog
          :model-value="visible"
          title="详情"
          @close="dialogClose"
          width="40%"
  >

     <el-form :model="row" ref="formRef" :rules="formRules" label-width="150px">
          <el-form-item label="名称：" prop="name">
            <el-input v-model="row.name" disabled></el-input>
          </el-form-item>
          <el-form-item label="邮箱收件人：" prop="email_recipient" v-if="row.notify_mode==1">
            <el-input v-model="row.email_recipient" disabled></el-input>
          </el-form-item>
          <el-form-item label="钉钉webhook：" prop="dingding_webhook" v-if="row.notify_mode==2">
            <el-input v-model="row.dingding_webhook" disabled  ></el-input>
          </el-form-item>
          <el-form-item label="企业微信webhook：" prop="weixin_webhook" v-if="row.notify_mode==3">
            <el-input v-model="row.weixin_webhook" disabled></el-input>
          </el-form-item>
          <el-form-item label="备注：">
            <el-input v-model="row.note" type="textarea" disabled></el-input>
          </el-form-item>
          <el-form-item label="创建时间：">
          <el-input v-model="row.create_time" :disabled="true"></el-input>
         </el-form-item>
      </el-form>

      <template #footer>
        <span class="dialog-footer">
          <el-button @click="dialogClose">取消</el-button>
        </span>
      </template>

  </el-dialog>
</template>

<script>
    export default {
        props: {
            visible: Boolean,
            row: '',  // 当前行内容
        },
        methods: {
          dialogClose() {
            this.$emit('update:visible', false)  // 当对话框关闭，通过父组件更新为false
          },
        }
    }
</script>

<style scoped>
/*.el-dialog div  {*/
/*    overflow: auto;*/
/*}*/
</style>